package main

import "github.com/astaxie/beego/logs"

func main() {
	//logs.SetLogger(logs.AdapterMultiFile, `{"filename":"test.log","separate":["emergency", "alert", "critical", "error", "warning", "notice", "info", "debug"]}`)
	logs.SetLogger(logs.AdapterFile, `{"filename":"item-logs/logs/test.log","maxsize":102400}`)
	logs.EnableFuncCallDepth(true)
	l := logs.GetLogger("rodot")
	l.Println("this is a message of http")

	logs.GetLogger("ORM").Println("this is a message of orm")

	logs.Debug("my book is bought in the year of ", 2016)
	logs.Info("this %s cat is %v years old", "yellow", 3)
	logs.Warn("json is a type of kv like", map[string]int{"key": 2016})
	logs.Error(1024, "is a very", "good game")
	logs.Critical("oh,crash")
	i := 1
	for {
		logs.Info("line:%d", i)
		i++
		if i > 10000 {
			break
		}
	}
}
